<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<script src="./jquery.js"></script>

<body>
  <script>

    let arr = setTimeout(function () {
      var xhr = new XMLHttpRequest()
      xhr.open('get', 'http://api.tianapi.com/duilian/index?key=728e18709a9c7c5a2c22b8152fee7f8b')
      xhr.send()
      xhr.onreadystatechange = function () {
        if (xhr.readyState === 4 && xhr.status === 200) {
          console.log(xhr.responseText)
        }
      }
    }, 3000)

  </script>
</body>

</html>